<div class="layui-form" lay-filter="layuiadmin-form-admin" id="layuiadmin-form-admin" style="padding: 20px 30px 0 0;">
    <div class="layui-row">
        <div class="layui-col-xs12 layui-col-sm6 layui-col-md4">
            <div class="layui-form-item">
                <label class="layui-form-label">休假人</label>
                <div class="layui-input-block">
                    <input type="text" value="{$model.username ?? ''}" required
                           placeholder="请输入{$model.alternative_title??'休假'}"
                           autocomplete="off"
                           class="layui-input" readonly>
                </div>
            </div>
        </div>
        <div class="layui-col-xs12 layui-col-sm6 layui-col-md4">
            <div class="layui-form-item">
                <label class="layui-form-label">部门</label>
                <div class="layui-input-block">
                    <input type="text" value="{$model.group_name ?? ''}" required
                           placeholder="请输入项目名称"
                           autocomplete="off"
                           class="layui-input" readonly>
                </div>
            </div>
        </div>
        <div class="layui-col-xs12 layui-col-sm6 layui-col-md4">
            <div class="layui-form-item">
                <label class="layui-form-label">休假类型</label>
                <div class="layui-input-block">
                    <input type="text" value="{$model.alternative_title??'休假'}" required
                           placeholder="请输入休假类型"
                           autocomplete="off"
                           class="layui-input" readonly>
                </div>
            </div>
        </div>
        <div class="layui-col-xs12 layui-col-sm6 layui-col-md4">
            <div class="layui-form-item">
                <label class="layui-form-label">颜色标记</label>
                <div class="layui-input-block">
                    <div class="layui-input-block" style="margin:0px!important;">
                        <div class="layui-input-inline" style="margin:0px!important;">
                            <input type="text" name="color" lay-verify="required" value="{$model.color ??''}" placeholder="请选择颜色"
                                   class="layui-input" id="test-form-input"  readonly>
                        </div>
                        <div class="layui-inline">
                            <div id="test-form"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
            <div class="layui-form-item">
                <label class="layui-form-label">时间范围</label>
                <div class="layui-input-block">
                    <input type="text" value="{$model.start_time ??''}~{$model.end_time ??''}" required
                           placeholder="请输入开始时间"
                           autocomplete="off"
                           class="layui-input" readonly>
                </div>
            </div>
        </div>
        {if $model.alternative_title eq '调休'}
        <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
            <div class="layui-form-item">
                <label class="layui-form-label">对应时间</label>
                <div class="layui-input-block">
                    <input type="text" name="corresponding" id="corresponding" value="{$model.corresponding ??''}" required
                           placeholder="请输入对应时间"
                           autocomplete="off"
                           class="layui-input" readonly>
                </div>
            </div>
        </div>
        {/if}
        <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
            <div class="layui-form-item">
                <label class="layui-form-label">请假事由</label>
                <div class="layui-input-block">
                    <textarea placeholder="请输入请假事由" name="remark" class="layui-textarea" readonly>{$model.remark ?? ''}</textarea>
                </div>
            </div>
        </div>
    </div>
    <div class="layui-form-item layui-hide">
        <input type="button" lay-submit lay-filter="LAY-user-back-submit" id="LAY-user-back-submit" value="确认">
    </div>
</div>

<script src="/static/admin/layui/layui.js"></script>

<script>
    layui.config({
        base: '/static/admin/' //静态资源所在路径
    }).extend({
        index: 'lib/index', //主入口模块
        treeTable: '../admin/lib/extend/authtree'
    }).use(['index', 'form', 'laydate', 'colorpicker'], function () {
        var $ = layui.$, form = layui.form, laydate = layui.laydate, colorpicker = layui.colorpicker;
        colorpicker.render({
            elem: '#test-form'
            , color:'{$model.color ?? \'#1c97f5\'}'
            , done: function (color) {
                $('#test-form-input').val(color);
            }
        });
    });
</script>